
<template>
  <div class="home">
    <div class="home-cont">
      <!-- 轮播图 -->
      <z-carousel />
      <z-title content="热门活动" more="更多活动" link="/"></z-title>
      <!-- 热门活动 -->
      <hot-activity />
      <!-- tag标签 -->
      <z-tag />
      <div class="flex-c-b">
        <div class="select">
          <div>
            <el-select
              :popper-append-to-body="false"
              v-model="value"
              placeholder="日期"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
          <div>
            <el-select
              :popper-append-to-body="false"
              v-model="value"
              placeholder="位置"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
          <div>
            <el-select
              :popper-append-to-body="false"
              v-model="value"
              placeholder="费用"
            >
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </div>
        </div>
        <div class="link" @click="routeTo">更多活动</div>
      </div>
      <hot-activity />
    </div>
    <div class="video">
      <div class="video-data">
        <div class="left">
          <img src="@/assets/imgs/index/video-date.png" alt="" />
          <a href="/">
            <p>更多精彩活动</p>
          </a>
        </div>
        <div v-for="i in 3" :key="i" class="right">
          <div style="width: 301px; height: 293px; position: relative">
            <div class="video-speaker">WeDesign</div>
            <div class="video-head-wrap">
              <img src="@/assets/imgs/index/teacherBox.png" />
            </div>
            <img
              style="width: 301px; height: 180px"
              src="@/assets/imgs/index/videoImg.png"
            />
            <div class="content-wrap">
              <div class="video-title-l">WeDesign新春直播讲座</div>
              <div class="video-title-r">详情</div>
              <div class="abstract">
                <p>艺术设计如何打造你的未来</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <z-title
      style="margin-top: 108px"
      content="线上直播名师"
      link="/"
    ></z-title>
    <TeacherBox />
    <z-title content="部落格" more="更多文章" link="/"></z-title>
    <TribeBox />
  </div>
</template>

<script>
import HotActivity from "./index-module/hot-activity/index"
import TeacherBox from "./index-module/teacher-box/index.vue"
import TribeBox from "./index-module/tribe-box/index.vue"

export default {
  name: "HomeView",
  components: { HotActivity, TeacherBox, TribeBox },
  data () {
    return {
      options: [{
        value: '选项1',
        label: '123123'
      }],
      value: "123"
    }
  },
  created () {
  },
  methods: {
    routeTo () { }
  }
}
</script>
<style lang="scss" scoped>
::v-deep .el-input__inner {
  width: 237px;
  height: 48px;
  background: #d8d8d8;
  color: #414042;
  border-radius: 25px;
  border: 0;
  font-size: 24px;
  font-weight: 700;
}
.el-select-dropdown__item {
  font-size: 18px;
  font-weight: 700 !important;
  color: #414042;
  font-weight: 200;
  background-color: #d8d8d8;
}
.el-select-dropdown__item:hover {
  background-color: #fff;
}
/deep/.el-popper[x-placement^="bottom"] {
  margin-top: 0px;
}
/deep/.el-select-dropdown__list {
  padding: 0;
}
/deep/.el-popper .popper__arrow,
/deep/.el-popper .popper__arrow::after {
  display: none;
}
.right {
  margin-right: 41px;
  transition: transform 0.2s;
}
.right:hover {
  cursor: pointer;
  transform: translate(0, -20px);
}
.video-head-wrap {
  img {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    position: absolute;
    top: -12px;
    left: -12px;
  }
}
.video-speaker {
  width: 61px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  position: absolute;
  top: 18px;
  left: 50px;
  background-color: #fff;
  font-size: 12px;
  font-weight: 900;
  color: #2e4562;
  padding: 0 8px;
}
.content-wrap {
  width: 255px;
  height: 120px;
  background-color: #fff;
  margin-top: -6px;
  padding: 0 31px 0 15px;
}
.video-title-l {
  width: 210px;
  height: 49px;
  line-height: 49px;
  font-size: 19px;
  font-weight: 700;
  color: #414042;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.video-title-r {
  position: absolute;
  top: 189px;
  right: 30px;
  font-size: 19px;
  font-weight: 700;
  color: #414042;
}
.video-title-r::after {
  position: absolute;
  content: "";
  width: 9px;
  height: 9px;
  border: 3px solid #414042;
  border-top: none;
  border-left: none;
  transform: rotate(-45deg);
  top: 7px;
}
.abstract {
  p {
    width: 255px;
    height: 21px;
    line-height: 21px;
    color: #414042;
    font-size: 12px;
  }
}
.home {
  &-cont {
    width: $main_width;
    margin: 0 auto;
  }
  .select {
    display: grid;
    grid-template-columns: repeat(3, 254px);
  }
  .video {
    height: 541px;
    width: 100vw;
    background-color: $main_color;
    margin-top: 60px;
    margin-left: calc(-1 * (100vw - 1400px) / 2);
    padding-top: 220px;
  }
  .video-data {
    // margin: 0 auto;
    // height: 100px;
    // width: 100px;
    display: flex;
    justify-content: center;
    .left {
      margin-right: 100px;
      img {
        width: 227px;
        height: 227px;
      }
      a {
        position: relative;
        text-decoration: none;
        outline: none;
        p {
          font-size: 18px;
          color: #fff;
          font-weight: 600;
          text-align: center;
          margin-top: 10px;
        }
        p::before {
          position: absolute;
          content: "";
          width: 8px;
          height: 8px;
          border: 3px solid #fff;
          border-top: none;
          border-left: none;
          transform: rotate(-45deg);
          top: 39px;
          right: 46px;
        }
      }
    }
  }
}
</style>
